package cn.txdnet.txcms.task;
import txdnet.util.Logger;
import txdnet.util.image.ImageUtil;

public class ResizeImageTask implements Runnable {
	
	private String srcImg;
	private String distImg;
	private int reWidth;
	private int reHeight;
	
	public ResizeImageTask(
			String srcImg,
			String distImg,
			int reWidth, 
			int reHeight){
		this.srcImg = srcImg;
		this.distImg = distImg;
		this.reWidth = reWidth;
		this.reHeight = reHeight;
		
	}

	@Override
	public void run() {
		// TODO Auto-generated method stub
		try{
	    ImageUtil.resize(srcImg, distImg, reWidth, reHeight, false);
		}catch(Exception e){
			Logger.error(ResizeImageTask.class, e.toString());
		}
	}

}
